<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateBusinessCommentsTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('business_comment', function(Blueprint $table)
		{
			$table->increments('id');
			$table->timestamps();

			//关联tyw_business_circle中的id
			$table->integer('circle_id');
			//关联tyw_users中的id 发评论的用户
			$table->integer('uid');
			//text 评论内容
			$table->text('content');
			//int 11 赞数量
			$table->integer('zan_num');
			//int 11 如果用户评论的是评论，则此处为评论ID 否则为0
			$table->integer('comment_id');

			$table->softDeletes();



		});
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('business_comments');
	}

}
